Telegram Group & Telegram Channel
Walrus operator:

The Walrus or := operator is one of the latest additions to python 3.8.
It is an assignment operator that lets you assign value to a variable within an expression like conditional statements, loops, etc.


Example

If we want to check and print the length of a list:

Mylist = [1,2,3]
if(l := len(mylist) > 2)
print(l)


Output

3

Share and Support
@Python_Codes



tg-me.com/python_codes/221
Create:
Last Update:

Walrus operator:

The Walrus or := operator is one of the latest additions to python 3.8.
It is an assignment operator that lets you assign value to a variable within an expression like conditional statements, loops, etc.


Example

If we want to check and print the length of a list:

Mylist = [1,2,3]
if(l := len(mylist) > 2)
print(l)


Output

3

Share and Support
@Python_Codes

BY Python Codes


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/python_codes/221

View MORE
Open in Telegram


Python Codes Telegram | DID YOU KNOW?

Date: |

However, analysts are positive on the stock now. “We have seen a huge downside movement in the stock due to the central electricity regulatory commission’s (CERC) order that seems to be negative from 2014-15 onwards but we cannot take a linear negative view on the stock and further downside movement on the stock is unlikely. Currently stock is underpriced. Investors can bet on it for a longer horizon," said Vivek Gupta, director research at CapitalVia Global Research.

Python Codes from id


Telegram Python Codes
FROM USA